Integrand size = 31, antiderivative size = 87 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=-\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 B \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4149, 3100, 2827, 2716, 2719, 2720} \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}-\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 B \sin (c+d x)}{d \sqrt {\cos (c+d x)}}+\frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)} \]
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3100
Rule 4149
Rubi steps \begin{align*} \text {integral}& = \int \frac {C+B \cos (c+d x)+A \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2}{3} \int \frac {\frac {3 B}{2}+\frac {1}{2} (3 A+C) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+B \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{3} (3 A+C) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 B \sin (c+d x)}{d \sqrt {\cos (c+d x)}}-B \int \sqrt {\cos (c+d x)} \, dx \\ & = -\frac {2 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 B \sin (c+d x)}{d \sqrt {\cos (c+d x)}} \\ \end{align*}
Time = 0.69 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.79 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\frac {-6 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+2 (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\frac {2 (C+3 B \cos (c+d x)) \sin (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)}}{3 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(499\) vs. \(2(131)=262\).
Time = 2.76 (sec) , antiderivative size = 500, normalized size of antiderivative = 5.75
method | result | size |
default | \(\frac {2 \sqrt {-\left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (6 A \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-12 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+6 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 C \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+6 B \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+2 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}}{3 \left (4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(500\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 185, normalized size of antiderivative = 2.13 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\frac {\sqrt {2} {\left (-3 i \, A - i \, C\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + \sqrt {2} {\left (3 i \, A + i \, C\right )} \cos \left (d x + c\right )^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} B \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} B \cos \left (d x + c\right )^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, B \cos \left (d x + c\right ) + C\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 0.40 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.18 \[ \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx=\frac {2\,A\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,B\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]